<template>
    <div>
        <div class="title">
            <el-alert title="支付成功" type="success" :closable="false"></el-alert>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            orderDetailId: ''
        }
    },
    created() {
        this.getOrderDetailId();
    },
    methods: {
        getOrderDetailId(){
            let geturl = window.location.href;
            let getqyinfo = geturl.split('?')[1]   //qycode=1001&qyname=%E4%BC%81%E4%B8%9A%E5%BF%99   截取到参数部分
            let getqys = new URLSearchParams('?'+getqyinfo)  //将参数放在URLSearchParams函数中
            let orderDetailId = getqys.get('orderDetailId')
            if(orderDetailId){
                alert(orderDetailId);
                this.orderDetailId = orderDetailId;
                // this.updateOrderState();
            }else {
                alert('无法获取orderDetailId')
            }
            
        },
        //修改订单状态和付款时间
        updateOrderState(){
            if(!this.orderDetailId) return ;
            //发送请求

        }
    }
}
</script>
<style lang="less" scoped>
.title {
    max-width: 1225px;
    margin: 0 auto;

}
</style>